<?php
namespace Home\Controller;
use Think\Controller;
class MosterController extends Controller {


  public function mastercourselist(){

    $mastercourseModel=M('master_course');
    $master_course_id=$_GET['master_course_id'];
    $mastercourse=$mastercourseModel->table("mc.master_course_id='$master_course_id' and master_course mc,master m")->where('mc.master_course_id=m.master_course_id')->select();
    $this->mastercourse=$mastercourse;
    $this->ajaxReturn($mastercourse,'JSON');
    echo json_encode($mastercourse);

  }
  public function getMasterCourseDetail(){
    $mastercourseDetailModel=M('master_course');
    $master_course_id=$_GET['master_course_id'];
    $mastercourseDetail=$mastercourseDetailModel->table('master m,master_course mc')->where("mc.master_course_id='$master_course_id' and m.master_id=mc.master_id")->field('mc.*,m.*')->select();
    $this->mastercourse=$mastercourse;
    $this->ajaxReturn($mastercourseDetail,'JSON');
    //echo json_encode($mastercourseDetail);
  }
}
?>
